package puzzle.projecteuler.p200;

import astudy.util.AdvMath.Factors;


public class Problem174C {

	/**
	 * answer	: 209566
	 * time cost: 1297 ms
	 * 
	 * @param args
	 */
	public static void main(String[] args) {


		long s = System.currentTimeMillis();
		int m = 1000000;
		int[] N = new int[11];
		Factors[] fs = Factors.factor(m/4);
		for (int i = 0; i < m/4; i ++) {
			Factors f = fs[i];
			if (f != null) {
				int n = 1;
				for (Long p: f.keySet()) {
					n *= f.get(p)+1;
				}
				n /= 2;
				if (n < N.length) {
					N[n] ++;
				}
			}
		}
		
		int sum = 0;
		for (int n = 1; n <= 10; n ++) {
			sum += N[n];
		}
		System.out.println(sum);
		System.out.println((System.currentTimeMillis()-s) + " ms");
	}

}
